package com.entity;

// Generated 09.02.2014 20:16:29 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AttachmentEntity generated by hbm2java
 */
@Entity
@Table(name = "attachment", catalog = "jiraexcel")
public class AttachmentEntity implements java.io.Serializable {

	private Integer idAttachment;
	private UserEntity userEntity;
	private FieldsEntity fieldsEntity;
	private String self;
	private String id;
	private String filename;
	private Date created;
	private String size;
	private String mimeType;
	private String content;

	public AttachmentEntity() {
	}

	public AttachmentEntity(UserEntity userEntity, FieldsEntity fieldsEntity) {
		this.userEntity = userEntity;
		this.fieldsEntity = fieldsEntity;
	}

	public AttachmentEntity(UserEntity userEntity, FieldsEntity fieldsEntity,
			String self, String id, String filename, Date created, String size,
			String mimeType, String content) {
		this.userEntity = userEntity;
		this.fieldsEntity = fieldsEntity;
		this.self = self;
		this.id = id;
		this.filename = filename;
		this.created = created;
		this.size = size;
		this.mimeType = mimeType;
		this.content = content;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_attachment", unique = true, nullable = false)
	public Integer getIdAttachment() {
		return this.idAttachment;
	}

	public void setIdAttachment(Integer idAttachment) {
		this.idAttachment = idAttachment;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_author", nullable = false)
	public UserEntity getUserEntity() {
		return this.userEntity;
	}

	public void setUserEntity(UserEntity userEntity) {
		this.userEntity = userEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_fields", nullable = false)
	public FieldsEntity getFieldsEntity() {
		return this.fieldsEntity;
	}

	public void setFieldsEntity(FieldsEntity fieldsEntity) {
		this.fieldsEntity = fieldsEntity;
	}

	@Column(name = "self", length = 1000)
	public String getSelf() {
		return this.self;
	}

	public void setSelf(String self) {
		this.self = self;
	}

	@Column(name = "id", length = 1000)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "filename", length = 1000)
	public String getFilename() {
		return this.filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created", length = 19)
	public Date getCreated() {
		return this.created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	@Column(name = "size", length = 1000)
	public String getSize() {
		return this.size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	@Column(name = "mimeType", length = 1000)
	public String getMimeType() {
		return this.mimeType;
	}

	public void setMimeType(String mimeType) {
		this.mimeType = mimeType;
	}

	@Column(name = "content", length = 1000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
